<div class="order_list_view full_screen" ng-controller="controller.order.list">

	<div scroller-box class="full_screen">
		<div class="container-fluid list_box">
			<div class="row">
				<span class="col-xs-2">
					<div class="input-group">
						<span class="input-group-addon">订单日期：</span>
						<span class="form-control">{{order.created|date:'yyyy-MM-dd'}}</span>
					</div>
				</span>
				<span class="col-xs-1">
					<div class="input-group">
						<span class="input-group-addon">总共：</span>
						<span class="form-control">{{order.items.length}}份</span>
					</div>
				</span>
				<span class="col-xs-2">
					<div class="input-group">
						<span class="input-group-addon">合计：</span>
						<span class="form-control">{{order.total}}元</span>
					</div>
				</span>
				<span class="col-xs-2">
					<div class="input-group">
						<span class="input-group-addon">状态：</span>
						<span class="form-control">{{order.status?'已结束':'正在点餐'}}</span>
					</div>
				</span>
				<span class="col-xs-2">
					<div class="input-group">
						<span class="input-group-addon">搜索:</span>
						<input ng-model="query" type="text" class="form-control">
					</div>
				</span>
				<span class="col-xs-2">
					<div class="input-group">
	            		<span class="input-group-addon">排序:</span>
	            		<select ng-model="ord" class="form-control">
		                	<option value="account.id">姓名</option>
		                	<option value="meal.name">菜名</option>
		                	<option value="meal.price">单价</option>
		                	<option value="quantity">数量</option>
		                	<option value="created">下单时间</option>
	            		</select>
					</div>
				</span>
				<span class="col-xs-1">
					<span ng-show="order.status" ng-click="openOrder()" class="btn btn-default">开始点餐</span>
					<span ng-show="!order.status" ng-click="closeOrder()"  class="btn btn-default">结束点餐</span>
				</span>
			</div>
			<table class="table table-hover">
				<thead>
					<tr>
						<th>头像</th>
						<th>名称</th>	
						<th>菜名</th>
						<th>单价</th>	
						<th>数量</th>	
						<th>总计</th>
						<th>下单时间</th>
						<th ng-show="order.status"></th>
					</tr>
				</thead>
				<tbody>
					<tr order-item-id={{item.id}} ng-repeat="item in order.items | filter : query | orderBy : ord" class="{{item.check?'checked_color':''}}">
						<td class="img_td"><img class="img" ng-src="{{item.account.headimg}}"></td>
						<td>{{item.account.remarkName?item.account.remarkName:item.account.nickname}}<span class="glyphicon glyphicon-edit remark" ng-click="remark(item.account)"></span></td>	
						<td  class="icon-box">{{item.meal.name}}<span class="glyphicon glyphicon-remove state-icon" ng-click="del()"></span></td>
						<td>{{item.meal.price+'元'}}</td>	
						<td>{{item.quantity+'份'}}</td>	
						<td>{{item.meal.price*item.quantity+'元'}}</td>
						<td>{{item.created|date:'HH:mm:ss'}}</td>
						<td ng-show="order.status" class="icon-box" ng-click="item.check=!item.check;"><span class="state-icon glyphicon {{item.check?'glyphicon-check':'glyphicon-unchecked'}}"></span></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<dialog></dialog>
</div>
